import requests from '../config/request.js'

export const loginWithAccount = (payload) => {
	return requests.httpRequest({
		url: "Login/CustomerLogin",
		data: payload
	});
};

export const updateCustomerPhone = (payload) => {
	return requests.httpTokenRequest({
		url: "Login/UpdateCustomerPhone",
		data: payload
	});
};

export const getCustomerWeChatPermission = (payload) => {
	return requests.httpTokenRequest({
		url: "Login/GetCustomerWeChatPermission",
		data: payload
	});
};

export const getEnableYuewanSwitch = (payload) => {
	return requests.httpRequest({
		url: "/Login/GetWechatSetting",
		data: payload
	});
};

// ***************************************新接口
export const getLogin = (payload) => {
	return requests.httpRequest({
		url: "/member/auth/social-login",
		data: payload
	});
};

// 获取消息字典
export const getDictOpen = (dictLabel) => {
	let params = {
		dictType: 'system_on',
		dictLabel: dictLabel
	}
	return requests.requestAll("/common/selectDictValue", 'post', params, false);
};